package com.poi.exp.analysis;

import java.util.List;

import org.apache.poi.ss.usermodel.Row;

import com.google.common.collect.Lists;

public class RowAnalysisStrategy {

	public static final List<RowAnalysis> processors = Lists.newArrayList();
	static {
		processors.add(new LoopRowAnalysis());
	}

	public static RowAnalysis getRowAnalysis(Row row) {
		for (RowAnalysis processor : processors) {
			int flag = processor.support(row);
			if (flag >= 0) {
				return processor;
			}
		}

		return DefaultRowAnalysis.SINGLE.INSTANCE;
	}

}
